﻿using System;
using System.Collections.Generic;
using System.Text;

namespace csharpcore7_ch3
{
    public class Point { public int X, Y; }
    class GetType_typeof_test
    {
        static void _Main()
        {
            Point p = new Point();
            Console.WriteLine(p.GetType().Name);    //Point
            Console.WriteLine(typeof(Point).Name);//Point
            Console.WriteLine(p.GetType() == typeof(Point));//True
            Console.WriteLine(p.X.GetType().Name);      //Int32
            Console.WriteLine(p.Y.GetType().FullName);  //System.Int32
        }
    }
}
